Ring r1, r2, r3, r4, r5;

void setup () {
  size (1000, 600);
  background (#C0C0C0);
  r1 = new Ring (300.0, 200.0, 200.0, 20, #0099FF);
  r2 = new Ring (520.0, 200.0, 200.0, 20, #000000);
  r3 = new Ring (740.0, 200.0, 200.0, 20, #FF0000);
  r4 = new Ring (410.0, 320.0, 200.0, 20, #FFFF00);
  r5 = new Ring (630.0, 320.0, 200.0, 20, #33CC33);
}

void draw() {
  background (#C0C0C0);
  r1.display();
  r2.display();
  r3.display();
  r4.display();
  r5.display();
}
  

class Ring {
  float centerX, centerY;
  float diameter;
  int weight;
  color ringColor;
  
  Ring (float x, float y, float d, int w, color cl) {
    centerX = x;
    centerY = y;
    diameter = d;
    weight = w;
    ringColor = cl;
  }
  
  void display() {
    noFill();
    strokeWeight(weight);
    stroke(ringColor);
    ellipse(centerX, centerY, diameter, diameter);
  }
}
